import request from '@/utils/request'

// 分页条件查询学科
export const queryPageApi = (name, page, pageSize) =>
    request.get(`/subjects?name=${name}&page=${page}&pageSize=${pageSize}`)

// 新增学科
export const addApi = (subject) => request.post('/subjects', subject)

// 根据ID查询学科
export const queryInfoApi = (id) => request.get(`/subjects/${id}`)

// 更新学科
export const updateApi = (subject) => request.put('/subjects', subject)

// 删除学科
export const deleteApi = (id) => request.delete(`/subjects/${id}`)

// 查询全部学科信息
export const queryAllApi = () => request.get('/subjects/list')